/*
 * Copyright (C) 2009-2018 Hangzhou 2Dfire Technology Co., Ltd. All rights reserved
 */
package com.ws.soa.consumer.constant;

/**
 * Constants
 *
 * @author luobosi@2dfire.com
 * @since 2019-03-02
 */
public class Constants {

    public static final String SUCCESS = "success";

    /**
     * 默认相关
     */
    public static class Default {
        //月份
        public static final int ONE_MONTH = 30 * 24 * 60 * 60;
        //天数
        public static final int ONE_DAY = 24 * 60 * 60;
        //小时
        public static final int ONE_HOUR = 60 * 60;
        //分钟
        public static final int ONE_MINUTE = 60;
        //秒
        public static final int ONE_SECOND = 1;
        //token
        public static final String TOKEN = "token";
        //productType
        public static final String PRODUCT_TYPE = "productType";
        //ua
        public static final String USER_AGENT = "User-Agent";
        //微信
        public static final String WX_USER_AGENT = "MicroMessenger";
        //用户未授权
        public static final int ERROR_UN_OAUTH = -1;
        //参数未带产品类型字段
        public static final int ERROR_UN_PRODUCT_TYPE = -2;
        //用户请求UA错误
        public static final int ERROR_USER_AGENT = -3;
        //支付回调
        public static final String COMMON_PAY_CALLBACK_URL = "http://www.sxhuzhu.com/good-deeps/notify/common/pay";
        //公众号授权
        public static final String MP_OAUTH_CALLBACK_URL = "http://www.sxhuzhu.com/good-deeps/notify/mp/auth";
        //安全文件路径
        public static final String KEY_PATH = "classpath:apiclient_cert.p12";
        //成功
        public static final String SUCCESS = "success";
        //标点符号-点
        public static final String PUNCTUATION_SPOT = ".";
        //加密方式
        public static final String MD5 = "MD5";

        /**
         * 验证码
         */
        public static final String VERIFY_CODE = "verify-code:";

    }


    /**
     * session相关
     */
    public static class Session {
        //用户请求sessionId
        public static final String SESSION_ID = "session_data";
    }

    /**
     * 缓存时间
     */
    public static class CacheTime {

        public static final int REPEAT_WECHAT_MSG_TIME = 3;

        public static final Long MSG_EXPIRE_INTERVAL_TIME = 1000L * 5 * 60;

        public static final int FIVE_MINUTE = 5 * 60;
    }

    /**
     * session相关
     */
    public static class CacheKey {
        public static final String DEFAULT_PREFIX = "good:";

        public static final String DEFAULT_SUFFIX = "prchase:";

        public static final String REPEAT_WECHAT_MSG_KEY = DEFAULT_PREFIX + "mp_repeat_wechat_msg_prefix:";

        public static final String REPEAT_CONSUMER_MQ_MSG_KEY = DEFAULT_PREFIX + "repeat_consumer_mq_msg:";

        public static final String WECHAT_MP_MQ_APP_MSG_KEY = DEFAULT_PREFIX + "wechat_mp_mq_app_msg_key:";

        public static final String WECHAT_MP_MQ_MSG_MSG_KEY = DEFAULT_PREFIX + "wechat_mp_mq_msg_msg_key:";

        public static final String WECHAT_MP_MQ_WECHAT_MSG_KEY = DEFAULT_PREFIX + "wechat_mp_mq_wechat_msg_key:";

        public static final String WX_TOKEN_PREFIX = "wx:token:";

        public static final String WX_COMMON_REPEAT_PAY_PREFIX = "wx:common:repeat_pay:";

        public static final String WX_COMMON_REPEAT_REWARD_PREFIX = "wx:common:repeat_reward:";

        public static final String WX_COMMON_REPEAT_WITHDRAW_PREFIX = "wx:common:repeat_withdraw:";

        public static final String WX_BLESS_REPEAT_CREATE_COUPON_PREFIX = "wx:bless:repeat_create_coupon:";

        public static final String WX_BLESS_REPEAT_WITHDRAW_PREFIX = "wx:bless:repeat_withdraw:";

        public static final String WX_BLESS_REPEAT_APPLY_PREFIX = "wx:bless:repeat_apply:";

        public static final String WX_BLESS_REPEAT_REPORT_PREFIX = "wx:bless:repeat_report:";

        public static final String WX_REPEAT_AUTH_NOTIFY_PREFIX = "wx:repeat:auth_notify:";

        public static final String WX_REPEAT_EVENT_NOTIFY_PREFIX = "wx:repeat:event_notify:";

        public static final String BLESS_RED_PACKET_PREFIX = "bless:red_packet:";

        public static final String BLESS_PACKET_RECEIVE_PREFIX = "bless:packet_receive:";

        public static final String TASK_DO_REFUND_ACTION = "task:do_refund_action";

        public static final String TASK_DELETE_EXPIRE_PAY = "task:delete_expire_pay";

        public static final String TASK_MOVE_RED_PACKET_INFO = "task:move_red_packet_info";

        public static final String WX_REPEAT_MA_QRCODE_SCENE_PREFIX = "wx:repeat_ma_qrcode_scene:";
    }
}
